﻿using MB.Orm.DB;
using MB.RuleBase.Common;
using Model;
using Public.DataAccess;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Business.Service
{
    public class BQuality
    {
        public List<QualityItem> GetQualityItemList(int pageIndex, int pageSize, out int total, params object[] parValues)
        {
            using (var DbScope = new OperationDatabaseScope(new OperationDatabaseContext("NewWeb")))
            {
                List<QualityItem> list = PagedDatabaseExcuteByXmlHelper.NewInstance.GetPagedObjectsByXml3<QualityItem>
                                                ("Quality", "GetQualityItem", pageIndex, pageSize, out total, parValues);
                return list;
            }
        }
        public List<QualityItem> GetQualityWOCList(int pageIndex, int pageSize, out int total, params object[] parValues)
        {
            using (var DbScope = new OperationDatabaseScope(new OperationDatabaseContext("NewWeb")))
            {
                List<QualityItem> list = PagedDatabaseExcuteByXmlHelper.NewInstance.GetPagedObjectsByXml3<QualityItem>
                                                ("Quality", "GetQualityWOC", pageIndex, pageSize, out total, parValues);
                return list;
            }
        }
    }
}
